<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/4/17
  Time: 11:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
        <center>
            <h1>员工添加</h1>
            <form action="/employee" method="post">
                <input type="hidden" name="method" value="updateEmployee">
                <input type="hidden" name="id" value="${employee.id}">
                姓名:<input type="text" name="ename" value="${employee.name}"><br/>
                生日:<input type="text" name="birthday" value="${employee.birthday}"><br/>
                <input type="hidden" id="sex1" value="${employee.gender}">
                性别:<input type="radio" value="男" name="sex" >男  <input type="radio" value="女" name="sex"> 女<br/>
                工作:<input type="text" name="jobs" value="${employee.jobs}"><br/>
                电话:<input type="text" name="phone" value="${employee.phone}"><br/>
                <input type="submit" value="修改员工">
            </form>
        </center>
</body>
<script type="text/javascript">
   var sexs= document.getElementsByName("sex");
   var sexValue=document.getElementById("sex1").value;
   alert(sexValue)
   if(sexValue=='男'){
       sexs[0].checked=true;
   }
   if(sexValue=='女'){
       sexs[1].checked=true;
   }
</script>
</html>
